package com.micro.ai.agents.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 智能体实体类
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@TableName("agents")
@Schema(description = "智能体信息")
public class Agent implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "智能体ID", example = "agent_123456789")
    private String id;

    @Schema(description = "租户ID", example = "tenant_001")
    private String tenantId;

    @Schema(description = "智能体名称", example = "客服助手")
    private String name;

    @Schema(description = "描述", example = "专业的客服智能助手")
    private String description;

    @Schema(description = "系统提示词", example = "你是一个专业的客服助手...")
    private String systemPrompt;

    @Schema(description = "主模型配置ID", example = "config_123")
    private String modelConfigId;

    @Schema(description = "降级模型配置ID", example = "config_456")
    private String fallbackModelConfigId;

    @Schema(description = "是否使用微调模型", example = "false")
    private Boolean useFineTunedModel;

    @Schema(description = "微调模型ID", example = "model_123")
    private String fineTunedModelId;

    @Schema(description = "训练数据集ID", example = "dataset_123")
    private String trainingDatasetId;

    @Schema(description = "温度参数", example = "0.7")
    private BigDecimal temperature;

    @Schema(description = "最大token数", example = "2000")
    private Integer maxTokens;

    @Schema(description = "状态", example = "active", allowableValues = {"active", "inactive", "training"})
    private String status;

    @Schema(description = "头像URL", example = "https://example.com/avatar.jpg")
    private String avatarUrl;

    @Schema(description = "欢迎消息", example = "您好，我是智能助手，有什么可以帮助您的？")
    private String welcomeMessage;

    @Schema(description = "标签（JSON）", example = "[\"客服\", \"智能\"]")
    private String tags;

    @Schema(description = "版本号", example = "1.0.0")
    private String version;

    @Schema(description = "创建人ID", example = "user_001")
    private String createdBy;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;
}

